{% extends "admin/base.html" %}
{% block title %} 添加分类 {% endblock %}
{% block menu %}
    {% set menu_current = 'category' %}
    {% include 'admin/menu.html' %}
{% endblock %}
{% block content %}
    <div id="where">当前位置： <a href="../category" title="">分类管理</a> &raquo; <span class="chosen">添加分类</span></div>
    <div id="category-add" class="content">
        <h3>添加分类</h3>
        <div class="form-box">
            <form method="post" action="">         
            <table cellspacing="0">
            <tbody>
            {% include 'admin/form_table.html' %}
                <tr>
                    <th></th>                    
                    <td><input type="submit" class="button" value="添加分类" /></td>
                </tr>
            </tbody>
            </table>
            </form>
        </div>
    </div>
{% endblock %}
{% block js %}
<script language="JavaScript" type="text/javascript">
<!--
$(function(){
    $('.pinyin').click(function(){
        var keyword = $('#title').attr('value');
        $.get(
            "/admin/slug",
            {'q':keyword},
            function(data){
                $('#slug').attr('value',data);
            },
            'json'
        )
    })
    $('.translate').click(function(){
        var keyword = $('#title').attr('value');
        $.get(
            "/admin/slug",
            {'q':keyword,'fun':'translate'},
            function(data){
                $('#slug').attr('value',data);
            },
            'json'
        )
    })
})
//-->
</script>
{% endblock %}